package fr.cephb.operonj.core.db.database;



import com.sleepycat.bind.tuple.IntegerBinding;
import com.sleepycat.bind.tuple.TupleBinding;
import com.sleepycat.je.DatabaseConfig;
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Environment;
import com.sleepycat.je.Transaction;

import fr.cephb.operonj.core.bio.Build;
import fr.cephb.operonj.core.db.binding.BuildBinding;
import fr.cephb.operonj.core.je.PrimaryDB;

public class BuildDB
	extends PrimaryDB<Integer, Build>
	{
	public static final String DEFAULT_NAME="id2build";
	private IntegerBinding keyBinding=new IntegerBinding();
	private BuildBinding valueBinding=new BuildBinding();
	public BuildDB(
			Environment env,
			Transaction txn,
			String databaseName,
			DatabaseConfig dbConfig
			) throws DatabaseException
		{
		super(env,txn,databaseName,setIntSorter(defaultDbCfg(env,dbConfig)));
		}
	@Override
	public TupleBinding<Integer> getKeyBinding()
		{
		return keyBinding;
		}
	@Override
	public TupleBinding<Build> getValueBinding()
		{
		return valueBinding;
		}
	
	
	@Override
	public String getDefaultName()
		{
		return DEFAULT_NAME;
		}
	
	
	}
